<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta name="referrer" content="no-referrer"><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>扣小妖 - 日常记录</title><meta name="author" content="扣小妖"><meta name="copyright" content="扣小妖"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="日常记录">
<meta property="og:type" content="website">
<meta property="og:title" content="扣小妖">
<meta property="og:url" content="http://liukuaizhuan.gitee.io/index.html">
<meta property="og:site_name" content="扣小妖">
<meta property="og:description" content="日常记录">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://p.ananas.chaoxing.com/star3/origin/c6eb667caaea4b46a934d65b6a348821.png">
<meta property="article:author" content="扣小妖">
<meta property="article:tag" content="笔记">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://p.ananas.chaoxing.com/star3/origin/c6eb667caaea4b46a934d65b6a348821.png"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="http://liukuaizhuan.gitee.io/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/font-awesome/6.0.0/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/node-snackbar/0.1.16/snackbar.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://gcore.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"/search.xml","preload":true,"languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#1f1f1f","position":"bottom-left"},
  source: {
    justifiedGallery: {
      js: 'https://gcore.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://gcore.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '扣小妖',
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2023-02-13 23:35:57'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 5.4.2"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://p.ananas.chaoxing.com/star3/origin/c6eb667caaea4b46a934d65b6a348821.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">57</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">6</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">14</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fa fa-heartbeat"></i><span> 清单</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/photos/"><i class="fa-fw fas fa-images"></i><span> 照片</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 电影</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('https://pic4.zhimg.com/v2-0de151579db0231cbaa001f3a4ca10c7_r.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">扣小妖</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间轴</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fa fa-heartbeat"></i><span> 清单</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/photos/"><i class="fa-fw fas fa-images"></i><span> 照片</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 电影</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">扣小妖</h1><div id="site-subtitle"><span id="subtitle"></span></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left"><a href="/posts/faa48056.html" title="☆☆☆== hexo-常用语法 ==☆☆☆"><img class="post_bg" src="https://p.ananas.chaoxing.com/star3/origin/26b76ef792809782fbcee1ca60afdbf8.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="☆☆☆== hexo-常用语法 ==☆☆☆"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/faa48056.html" title="☆☆☆== hexo-常用语法 ==☆☆☆">☆☆☆== hexo-常用语法 ==☆☆☆</a><div class="article-meta-wrap"><span class="article-meta"><i class="fas fa-thumbtack sticky"></i><span class="sticky">置顶</span><span class="article-meta-separator">|</span></span><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-12-08T07:58:09.000Z" title="发表于 2022-12-08 15:58:09">2022-12-08</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/hexo/">hexo</a></span></div><div class="content">markdown基本语法



元素
markdown语法



标题
# H1标题内容  ## H2标题内容  ### H3标题内容


粗体
 ***bold text***


斜体
*italicized text*


引用块
&gt; blockquote


有序列表
1. First item 2. Second item3. Third item


无序列表
- First item- Second item- Third item


代码（Code）
   `code`


分隔线
---


链接（Link）
    [title](https://www.example.com)


图片（Image）
    ![alt text](image.jpg)


tab制表符
&amp;emsp;


扩展语法



元素
语法



代码块
```  &#123;   &quot;firstName&quot;: &quot;John&quot;,   &quot;lastName&quot;: &quot;Smith&quot;,   &quot;age& ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/posts/7bd12409.html" title="c++到QT学习阶段教程"><img class="post_bg" src="https://p.ananas.chaoxing.com/star3/origin/77ba8e4cf9c46f1272a6c9748c8b7c0c.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="c++到QT学习阶段教程"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/7bd12409.html" title="c++到QT学习阶段教程">c++到QT学习阶段教程</a><div class="article-meta-wrap"><span class="article-meta"><i class="fas fa-thumbtack sticky"></i><span class="sticky">置顶</span><span class="article-meta-separator">|</span></span><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-01-18T13:40:09.000Z" title="发表于 2023-01-18 21:40:09">2023-01-18</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/C-QT/">C++&amp;&amp;QT</a></span></div><div class="content">==================== C++ && QT 学习教程树 ==================== C++基础
c++基础教程(314集 | 传智播客 | B站)  https://www.bilibili.com/video/BV1et411b73Z/
QT基础系列教程 | 大轮明王讲Qt | B站
最新QT从入门到实战完整版|传智教育(B站) https://www.bilibili.com/video/BV1g4411H78N
Qt开发编程-入门基础教程Qt5  https://www.bilibili.com/video/BV1Jp4y167R9
Qt开发编程进阶-按钮的使用实战教程Qt5  https://www.bilibili.com/video/BV1ff4y1C7CK
Qt开发编程进阶-容器控件的使用实战教程Qt5 https://www.bilibili.com/video/BV1Ai4y1c7Di/
Qt中多线程-线程池的使用 https://www.bilibili.com/video/BV1iN411f7dY/
Qt多线程网络通信 https: ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/posts/3d03b6cd.html" title="000. 工具包"><img class="post_bg" src="https://p.ananas.chaoxing.com/star3/origin/27849ab9f4ceb0c6b375ee25ab90aea5.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="000. 工具包"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/3d03b6cd.html" title="000. 工具包">000. 工具包</a><div class="article-meta-wrap"><span class="article-meta"><i class="fas fa-thumbtack sticky"></i><span class="sticky">置顶</span><span class="article-meta-separator">|</span></span><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2022-12-15T10:53:15.000Z" title="发表于 2022-12-15 18:53:15">2022-12-15</time></span></div><div class="content">常用web在线工具库 
          
            
              
                
              
              Json在线格式化 
              格式化json，在线JSON美化
            
          
          
            
              
                
              
              颜色对照表 
              常用网站开发的颜色
            
          
          
            
              
                
              
              MAC软件库 
              mac系统常用软件下载库
            
          工具库 
          
            
              
           ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/posts/7f4a6eeb.html" title="013.c++核心编程-类和对象"><img class="post_bg" src="https://p.ananas.chaoxing.com/star3/origin/7ea674ffcd12ef7d943d54c93e9203a4.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="013.c++核心编程-类和对象"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/7f4a6eeb.html" title="013.c++核心编程-类和对象">013.c++核心编程-类和对象</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-13T14:55:03.000Z" title="发表于 2023-02-13 22:55:03">2023-02-13</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/C-%E6%A0%B8%E5%BF%83%E7%BC%96%E7%A8%8B/">C++核心编程</a></span></div><div class="content">C++ 面向对象的三大特性: 封装、继承、多态 
C++ 认为万事万物都皆为对象，对象上有其属性和行为

在线课程 https://www.bilibili.com/video/BV1et411b73Z?p=99 

例如：

人可以作为对象，属性有姓名，年龄，身高，体重….，行为有 走，跑，跳，吃饭，唱歌。。。。
车也可以作为对象，属性有轮胎，方向盘，车灯…. 行为有载人，放音乐，放空调。。。。
具有相同性质的对象，我们可以抽象成为类，人属于人类，车属于车类

封装
   div .img_left{
        float:left;
    }



封装的意义封装是C++面向对象的三大特性之一
封装的意义：

将属性和行为作为一个整体，表现生活中的事物
将属性和行为加以权限控制

封装意义一：

在设计类的时候，属性和行为写在一起，表现事物

语法： class 类名&#123; 访问权限： 属性 / 行为 &#125;;
示例1:  设计一个圆类，求圆的周长

c++代码示例1234567891011121314151617181920212223242526272829 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/posts/4adebd64.html" title="012.C++核心编程-函数提高"><img class="post_bg" src="https://p.ananas.chaoxing.com/star3/origin/b6c49bb4892ad191edbc0363caf45530.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="012.C++核心编程-函数提高"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/4adebd64.html" title="012.C++核心编程-函数提高">012.C++核心编程-函数提高</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-13T14:51:24.000Z" title="发表于 2023-02-13 22:51:24">2023-02-13</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/C-%E6%A0%B8%E5%BF%83%E7%BC%96%E7%A8%8B/">C++核心编程</a></span></div><div class="content">
在线课程 https://www.bilibili.com/video/BV1et411b73Z?p=95 

函数默认参数在C++中，函数的形参列表中的形参是可以有默认值的。
语法：  返回值类型  函数名( 参数 = 默认值 ) &#123; &#125;

   div .img_left{
        float:left;
    }


示例：
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849// Created by Mac操作系统 , on 2023/2/9.//#include &quot;iostream&quot; using namespace std;/**************************************************************** * 函数默认参数 * 如果我们字节传入数据，就用自己的数据，如果没有，那么用默认值 * 语法： 返回值类型 函数名(形参 = 默认值)&#123;& ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/posts/bff12c11.html" title="011.C++核心编程-引用"><img class="post_bg" src="https://p.ananas.chaoxing.com/star3/origin/86403540a7b572fec123890e9a638adc.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="011.C++核心编程-引用"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/bff12c11.html" title="011.C++核心编程-引用">011.C++核心编程-引用</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-13T14:47:34.000Z" title="发表于 2023-02-13 22:47:34">2023-02-13</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/C-%E6%A0%B8%E5%BF%83%E7%BC%96%E7%A8%8B/">C++核心编程</a></span></div><div class="content">
在线课程 https://www.bilibili.com/video/BV1et411b73Z/?p=89 

引用的基本使用作用： 给变量起别名 
语法： 数据类型 &amp;别名 = 原名 

   div .img_left{
        float:left;
    }


示例：
123456789101112131415161718192021222324// Created by Mac操作系统 , on 2023/2/8.// 引用的基本使用#include &quot;iostream&quot;using namespace std;int main() &#123;    // 引用的基本语法    // 数据类型 &amp;别名= 原名    int a = 10;    // 创建引用    int &amp;b = a;    cout &lt;&lt; &quot;a=&quot; &lt;&lt; a &lt;&lt; endl;    cout &lt;&lt; &quot;b=&quot; &lt;&lt; b &lt;&lt; endl; ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/posts/9368cbfc.html" title="010.C++核心编程-内存分区模型"><img class="post_bg" src="https://p.ananas.chaoxing.com/star3/origin/b4c7f6d417c4c75ed02262f3549625c8.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="010.C++核心编程-内存分区模型"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/9368cbfc.html" title="010.C++核心编程-内存分区模型">010.C++核心编程-内存分区模型</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-06T15:28:05.000Z" title="发表于 2023-02-06 23:28:05">2023-02-06</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/C-%E6%A0%B8%E5%BF%83%E7%BC%96%E7%A8%8B/">C++核心编程</a></span></div><div class="content">本阶段主要针对C++面向对象编程技术做详细讲解，探讨C++中核心和精髓~~~

在线课程 https://www.bilibili.com/video/BV1et411b73Z?p=84 


   div .img_left{
        float:left;
    }


C++程序在执行时，将内存大方向划分为4个区域

代码区：存放函数体的二进制代码，由操作系统进行管理的
全局区：存放全局变量和静态变量以及常量
栈区：由编辑器自动分配释放，存放函数的参数值，局部变量等
堆区：由程序员分配和释放，若程序员不释放，程序结束时由操作系统回收

内存四分区模型

内存四区意义：
不同区域存放的数据，赋予不同的生命周期，给我们更大的灵活编程

程序运行前在程序编译后，生成了exe可执行程序，未执行该程序前分为两个区域 (代码区和全局区)

代码区
存放CPU执行机器指令
代码区是共享  的，共享的目的是对于频繁被执行的程序，只需要再内存中有一份代码即可
代码区是只读  的，使其只读的原因是防止程序意外地修改了它的指令


全局区
在线课程  https://www.bilibili ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/posts/b056b485.html" title="009.C++基础实战-通讯录管理系统"><img class="post_bg" src="https://p.ananas.chaoxing.com/star3/origin/5cdbcc7b75aea2aa3a8b12cae1439e99.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="009.C++基础实战-通讯录管理系统"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/b056b485.html" title="009.C++基础实战-通讯录管理系统">009.C++基础实战-通讯录管理系统</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-04T10:02:31.000Z" title="发表于 2023-02-04 18:02:31">2023-02-04</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/C-%E5%9F%BA%E7%A1%80%E5%85%A5%E9%97%A8/">C++基础入门</a></span></div><div class="content">
C++ 基础入门 【实战系列】 - 通讯录管理系统  在线课程 https://www.bilibili.com/video/BV1et411b73Z?p=72 

系统需求通讯录是一个可以记录亲人，好有信息的工具。本教程主要利用C++来实现一个通讯录管理系统系统中需要实现的功能如下：

添加联系人：向通讯录中添加新人，信息包括( 姓名、性别、年龄、联系电话、家庭住址 ) 最多记录1000人
显示联系人：显示通讯录中所有联系人信息
删除联系人：按照姓名进行删除指定联系人
查找联系人：按照姓名查看指定联系人信息
修改联系人：按照姓名重新修改指定联系人
清空联系人：情况通讯录中所有信息
退出通讯录：退出当前使用的通讯录


创建项目
在线课程 https://www.bilibili.com/video/BV1et411b73Z?p=73 


创建新项目
添加文件

开发环境：MacOs ,开发编辑器CLion ,构建版本: c++20项目名称：需要非中文首字符( 我的本地开发环境：中文首字符会无法生成执行 )
创建项目并添加文件的图文步骤

需要注意地方： 
我的开发环境 ，创建项目 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/posts/4934793.html" title="008.C++基础入门 - 结构体"><img class="post_bg" src="https://p.ananas.chaoxing.com/star3/origin/fb32dd64e26579054d2252368f88c81c.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="008.C++基础入门 - 结构体"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/4934793.html" title="008.C++基础入门 - 结构体">008.C++基础入门 - 结构体</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-03T11:54:56.000Z" title="发表于 2023-02-03 19:54:56">2023-02-03</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/C-%E5%9F%BA%E7%A1%80%E5%85%A5%E9%97%A8/">C++基础入门</a></span></div><div class="content">结构体基本概念结构体属于用户自定义的数据类型，允许用户存储不同的数据类型。

结构体定义和使用在线课程
在线课程 https://www.bilibili.com/video/BV1et411b73Z?p=64  

课程视频下载到本地学习 


 

语法：   struct 结构体名 &#123; 结构体成员列表 &#125;;
通过结构体创建变量的方式有三种：

struct 结构体名 变量名 ☆常用☆ 
struct 结构体名 变量名={成员1值，成员2值…..} ☆常用☆ 
定义结构体时顺便创建变量 不推荐 


   div .img_left{
        float:left;
    }


示例：
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253// Created by Mac on 2023/2/3.// 结构体的定义和使用#include &quot;iostream&quot;#include &quot;st ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/posts/f81b9c9e.html" title="007.C++基础入门 - 指针"><img class="post_bg" src="https://p.ananas.chaoxing.com/star3/origin/27666aee9352884246f94ef7968abc3d.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="007.C++基础入门 - 指针"></a></div><div class="recent-post-info"><a class="article-title" href="/posts/f81b9c9e.html" title="007.C++基础入门 - 指针">007.C++基础入门 - 指针</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-01-29T14:20:55.000Z" title="发表于 2023-01-29 22:20:55">2023-01-29</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/C-%E5%9F%BA%E7%A1%80%E5%85%A5%E9%97%A8/">C++基础入门</a></span></div><div class="content">☆☆☆☆☆指针是必须要掌握的内容☆☆☆☆☆ 

指针的基本概念指针的作用： 可以通过指针间接访问内存! 

内存编号是从 0 开始记录的，一般用十六进制数字表示
可以利用指针变量保存地址


指针变量的定义和使用
在线课程  https://www.bilibili.com/video/BV1et411b73Z/?p=56

指针变量定义语法: 数据类型 * 指针变量名
思维图：

   div .img_left{
        float:left;
    }




代码实现： 
12345678910111213141516171819202122232425262728// Created by Mac on 2023/1/29.// 指针的定义和使用#include &quot;iostream&quot;using namespace std;int main() &#123;    // 定义一个变量并赋值    int a = 10;    // 1.定义指针    // 指针定义的语法： 数据类型 * 指针变量名;    int * p;    // 让指针记录 ...</div></div></div><nav id="pagination"><div class="pagination"><span class="page-number current">1</span><a class="page-number" href="/page/2/#content-inner">2</a><span class="space">&hellip;</span><a class="page-number" href="/page/6/#content-inner">6</a><a class="extend next" rel="next" href="/page/2/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://p.ananas.chaoxing.com/star3/origin/c6eb667caaea4b46a934d65b6a348821.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">扣小妖</div><div class="author-info__description">Email：  liukuaizhuan@qq.com</div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">57</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">6</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">14</div></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">This is my Blog 技术笔记</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/posts/7f4a6eeb.html" title="013.c++核心编程-类和对象"><img src="https://p.ananas.chaoxing.com/star3/origin/7ea674ffcd12ef7d943d54c93e9203a4.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="013.c++核心编程-类和对象"/></a><div class="content"><a class="title" href="/posts/7f4a6eeb.html" title="013.c++核心编程-类和对象">013.c++核心编程-类和对象</a><time datetime="2023-02-13T14:55:03.000Z" title="发表于 2023-02-13 22:55:03">2023-02-13</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/4adebd64.html" title="012.C++核心编程-函数提高"><img src="https://p.ananas.chaoxing.com/star3/origin/b6c49bb4892ad191edbc0363caf45530.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="012.C++核心编程-函数提高"/></a><div class="content"><a class="title" href="/posts/4adebd64.html" title="012.C++核心编程-函数提高">012.C++核心编程-函数提高</a><time datetime="2023-02-13T14:51:24.000Z" title="发表于 2023-02-13 22:51:24">2023-02-13</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/bff12c11.html" title="011.C++核心编程-引用"><img src="https://p.ananas.chaoxing.com/star3/origin/86403540a7b572fec123890e9a638adc.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="011.C++核心编程-引用"/></a><div class="content"><a class="title" href="/posts/bff12c11.html" title="011.C++核心编程-引用">011.C++核心编程-引用</a><time datetime="2023-02-13T14:47:34.000Z" title="发表于 2023-02-13 22:47:34">2023-02-13</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/9368cbfc.html" title="010.C++核心编程-内存分区模型"><img src="https://p.ananas.chaoxing.com/star3/origin/b4c7f6d417c4c75ed02262f3549625c8.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="010.C++核心编程-内存分区模型"/></a><div class="content"><a class="title" href="/posts/9368cbfc.html" title="010.C++核心编程-内存分区模型">010.C++核心编程-内存分区模型</a><time datetime="2023-02-06T15:28:05.000Z" title="发表于 2023-02-06 23:28:05">2023-02-06</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/posts/b056b485.html" title="009.C++基础实战-通讯录管理系统"><img src="https://p.ananas.chaoxing.com/star3/origin/5cdbcc7b75aea2aa3a8b12cae1439e99.png" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="009.C++基础实战-通讯录管理系统"/></a><div class="content"><a class="title" href="/posts/b056b485.html" title="009.C++基础实战-通讯录管理系统">009.C++基础实战-通讯录管理系统</a><time datetime="2023-02-04T10:02:31.000Z" title="发表于 2023-02-04 18:02:31">2023-02-04</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            <a class="card-more-btn" href="/categories/" title="查看更多">
    <i class="fas fa-angle-right"></i></a>
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/categories/C-QT/"><span class="card-category-list-name">C++&&QT</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/C-%E5%9F%BA%E7%A1%80%E5%85%A5%E9%97%A8/"><span class="card-category-list-name">C++基础入门</span><span class="card-category-list-count">9</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/C-%E6%A0%B8%E5%BF%83%E7%BC%96%E7%A8%8B/"><span class="card-category-list-name">C++核心编程</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Python%E5%AE%9E%E6%88%98%E9%A1%B9%E7%9B%AE/"><span class="card-category-list-name">Python实战项目</span><span class="card-category-list-count">2</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Python%E7%88%AC%E8%99%AB/"><span class="card-category-list-name">Python爬虫</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/excel%E6%95%99%E7%A8%8B/"><span class="card-category-list-name">excel教程</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/hexo/"><span class="card-category-list-name">hexo</span><span class="card-category-list-count">6</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/php/"><span class="card-category-list-name">php</span><span class="card-category-list-count">2</span></a></li>
            </ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/tags/C-%E5%9F%BA%E7%A1%80%E5%85%A5%E9%97%A8/" style="font-size: 1.5em; color: #99a9bf">C++基础入门</a> <a href="/tags/C-%E6%A0%B8%E5%BF%83%E7%BC%96%E7%A8%8B/" style="font-size: 1.37em; color: #99a4b2">C++核心编程</a> <a href="/tags/hexo%E7%9B%B8%E5%85%B3/" style="font-size: 1.1em; color: #999">hexo相关</a> <a href="/tags/tkinter%E7%95%8C%E9%9D%A2%E5%BA%94%E7%94%A8%E5%BC%80%E5%8F%91/" style="font-size: 1.23em; color: #999ea6">tkinter界面应用开发</a> <a href="/tags/%E5%9C%A8%E7%BA%BF%E5%B7%A5%E5%85%B7%E5%8C%85/" style="font-size: 1.1em; color: #999">在线工具包</a> <a href="/tags/%E7%99%BE%E5%BA%A6%E7%BD%91%E7%9B%98/" style="font-size: 1.1em; color: #999">百度网盘</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/02/"><span class="card-archive-list-date">二月 2023</span><span class="card-archive-list-count">6</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/01/"><span class="card-archive-list-date">一月 2023</span><span class="card-archive-list-count">11</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/12/"><span class="card-archive-list-date">十二月 2022</span><span class="card-archive-list-count">39</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/02/"><span class="card-archive-list-date">二月 2022</span><span class="card-archive-list-count">1</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">57</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2023-02-13T15:35:56.943Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023 By 扣小妖</div><div class="footer_custom_text"><p style="margin:10px 0 5px"><a target="_blank" href="https://hexo.io/" style="margin-inline:5px">博客 hexo</a><a target="_blank" href="https://butterfly.js.org/" style="margin-inline:5px">主题 Butterfly</a><a target="_blank" href="https://gitee.com/" style="margin-inline:5px">托管 Gitee</a></p></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div></div></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://gcore.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.min.js"></script><script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/node-snackbar/0.1.16/snackbar.min.js"></script><script src="/js/search/local-search.js"></script><div class="js-pjax"><script>function subtitleType () {
  if (true) { 
    window.typed = new Typed("#subtitle", {
      strings: ["日常记录"],
      startDelay: 300,
      typeSpeed: 150,
      loop: true,
      backSpeed: 50
    })
  } else {
    document.getElementById("subtitle").innerHTML = '日常记录'
  }
}

if (true) {
  if (typeof Typed === 'function') {
    subtitleType()
  } else {
    getScript('https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-M/typed.js/2.0.12/typed.min.js').then(subtitleType)
  }
} else {
  subtitleType()
}</script><script>(() => {
  const $mermaidWrap = document.querySelectorAll('#article-container .mermaid-wrap')
  if ($mermaidWrap.length) {
    window.runMermaid = () => {
      window.loadMermaid = true
      const theme = document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'default'

      Array.from($mermaidWrap).forEach((item, index) => {
        const mermaidSrc = item.firstElementChild
        const mermaidThemeConfig = '%%{init:{ \'theme\':\'' + theme + '\'}}%%\n'
        const mermaidID = 'mermaid-' + index
        const mermaidDefinition = mermaidThemeConfig + mermaidSrc.textContent
        mermaid.mermaidAPI.render(mermaidID, mermaidDefinition, (svgCode) => {
          mermaidSrc.insertAdjacentHTML('afterend', svgCode)
        })
      })
    }

    const loadMermaid = () => {
      window.loadMermaid ? runMermaid() : getScript('https://gcore.jsdelivr.net/npm/mermaid/dist/mermaid.min.js').then(runMermaid)
    }

    window.pjax ? loadMermaid() : document.addEventListener('DOMContentLoaded', loadMermaid)
  }
})()</script></div><script defer="defer" id="ribbon" src="https://gcore.jsdelivr.net/npm/butterfly-extsrc/dist/canvas-ribbon.min.js" size="150" alpha="0.6" zIndex="-1" mobile="false" data-click="false"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>